package com.wsoft.system.controller;

import com.wsoft.query.job.log.JobLogListQuery;
import com.wsoft.response.ResponsePage;
import com.wsoft.response.ResponseResult;
import com.wsoft.system.service.ITsJobLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 定时任务日志表 前端控制器
 * @author z001
 * @since 2024年10月23日 08:16:48
 */
@RestController
@Tag(name = "任务调度")
@RequestMapping("/job/log")
public class TsJobLogController {

    @Resource
    private ITsJobLogService jobLogService;

    @Operation(summary = "查询jobLog列表", description = "查询jobLog列表")
    @PostMapping("/list")
    public ResponseResult list(@RequestBody JobLogListQuery query) {
        return ResponseResult.success(ResponsePage.restPage(jobLogService.listJobLog(query)));
    }
}
